Solving two linear systems Ax=b with same coefficients